Class LogicAgent

java.lang.Object
edu.uky.ai.lp.ai.LogicAgent
All Implemented Interfaces:
Agent

public class LogicAgent
extends java.lang.Object
implements Agent
An artificially intelligent agent which uses logical reasoning based on observations to decide which squares are safe to visit.
Author:
Your Name
  • Constructor Summary

    Constructors 
    Constructor Description
    LogicAgent()
    Creates a new logical agent.
  • Method Summary

    Modifier and Type Method Description
    Action chooseAction​(Game game)
    Chooses the next move for the player to make.
    void observe​(Result result)
    Alerts the player to the result of the most recent action.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LogicAgent

      public LogicAgent()
      Creates a new logical agent.
  • Method Details

    • chooseAction

      public Action chooseAction​(Game game)
      Description copied from interface: Agent
      Chooses the next move for the player to make.
      Specified by:
      chooseAction in interface Agent
      Parameters:
      game - the current state of the game
      Returns:
      the action the player should take
    • observe

      public void observe​(Result result)
      Description copied from interface: Agent
      Alerts the player to the result of the most recent action.
      Specified by:
      observe in interface Agent
      Parameters:
      result - the result of the most recent action